// stores/userStore.js
import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
  state: () => ({
    username: '', // 存储用户名
    id:'',
  }),
  actions: {
    setUsername(name) {
      this.username = name
    },
    setId(id) {
        this.id = id
      },
  },
})